package fr.afcepf.hotels.soa.entity;

import java.io.Serializable;

import javax.persistence.*;


/**
 * The persistent class for the reservation_option database table.
 * 
 */
@Entity
@Table(name="reservation_option")
public class ReservationOption  implements Serializable {

	private static final long serialVersionUID = 1L;

	@Id
	private ReservationVoiture reservationVoiture;
	
	@Id
	private OptionLocation optionLocation;
	
	/*
	@EmbeddedId
	private ReservationOptionPK id;
    */
	
	@Column(nullable=false)
	private int quantite;

	//bi-directional many-to-one association to OptionLocation
	@ManyToOne
	@JoinColumn(name="idOption", nullable=false, insertable=false, updatable=false)
	private OptionLocation optionlocation;

	//bi-directional many-to-one association to ReservationVoiture
	@ManyToOne
	@JoinColumn(name="idReservationVoiture", nullable=false, insertable=false, updatable=false)
	private ReservationVoiture reservationvoiture;

	public ReservationOption() {
	}

	public ReservationVoiture getReservationVoiture() {
		return reservationVoiture;
	}

	public void setReservationVoiture(ReservationVoiture reservationVoiture) {
		this.reservationVoiture = reservationVoiture;
	}

	public OptionLocation getOptionLocation() {
		return optionLocation;
	}

	public void setOptionLocation(OptionLocation optionLocation) {
		this.optionLocation = optionLocation;
	}

	public static long getSerialversionuid() {
		return serialVersionUID;
	}

	public int getQuantite() {
		return this.quantite;
	}

	public void setQuantite(int quantite) {
		this.quantite = quantite;
	}

	public OptionLocation getOptionlocation() {
		return this.optionlocation;
	}

	public void setOptionlocation(OptionLocation optionlocation) {
		this.optionlocation = optionlocation;
	}

	public ReservationVoiture getReservationvoiture() {
		return this.reservationvoiture;
	}

	public void setReservationvoiture(ReservationVoiture reservationvoiture) {
		this.reservationvoiture = reservationvoiture;
	}

}